package cc.comac.mom.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.QualityRejectService;
import cc.comac.mom.bean.QualityReject;
import cc.comac.mom.util.ResultBean;

@RestController
@RequestMapping("/QualityReject")
public class QualityRejectController {
	@Autowired
	
	private QualityRejectService qualityRejectService;
	
	@RequestMapping(value = "/insert",method = RequestMethod.POST)
	public ResultBean insert(@RequestBody QualityReject obj) {
		return qualityRejectService.insert(obj);
	}
	
	@RequestMapping(value = "/insertBatch",method = RequestMethod.POST)
	public ResultBean insertBatch(@RequestBody List<QualityReject> list) {
		return qualityRejectService.insertBatch(list);
	}
	
	@RequestMapping(value = "/deleteBatch",method = RequestMethod.POST)
	public ResultBean deleteBatch(@RequestBody List<QualityReject> list) {
		return qualityRejectService.deleteBatch(list);
	}
	
	@RequestMapping(value = "/selectByCondition",method = RequestMethod.POST)
	public ResultBean selectByCondition(@RequestBody QualityReject obj) {
		return qualityRejectService.selectByCondition(obj);
	}
}
